<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品图片及详细描述管理</title>
<link rel="stylesheet" rev="stylesheet" href="<c:url value="/styles/ad/style.css"/>" type="text/css"/>
<script language="JavaScript" type="text/javascript" src="<c:url value="/scripts/jquery-1.4.4.min.js"/>"></script>
<style type="text/css">
<!--
.atten {font-size:12px;font-weight:normal;color:#F00;}
table.pic tr td{text-align: center;}
table.pic tr td img{width: 150px;height:180px;}
-->
</style>
</head>

<body class="ContentBody">

<div class="MainDiv">
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
  <tr>
      <th class="tablestyle_title" >商品图片及详细信息</th>
  </tr>
  <tr>
    <td class="CPanel">
		<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
		<tr>
			<td align="left">
				<input type="button" name="Submit2" value="返回" class="button" onclick="window.history.back();"/>			</td>
		</tr>
			<TR>
			<TD width="100%">
				<fieldset style="height:100%;">
				<legend>商品图片</legend>
					<table class="pic" border="0" cellpadding="2" cellspacing="1" style="width:100%">
					  <tr>
					    <td width="20%"><img src="<c:url value="${pro.pphoto}"/>"><br>封面</td>
					    <c:forEach items="${pclist }" var="pc">
					   	 <td width="20%"><img src="<c:url value="${pc.picurl}"/>"><br><a href="<c:url value="/product/removepropic?piccode=${pc.piccode}&pcode=${pro.pcode}"/>" onclick="return confirm('确定删除？');">删除</a></td>
					    </c:forEach>
					  </tr>
					  <tr>
					    <td width="80%" colspan="4">
					    	<form action="<c:url value="/product/douploadpropic"/>" method="post"  enctype="multipart/form-data">
 							 <input type="hidden" value="${pro.pcode}" name="pcode"/>
					  	  上传商品图片(<=4张):<input type="file" name='pcfile' style="width:250px" id="pname" value="" /><span class="red">(尺寸：360*400)</span><input type="submit" name="Submit" onclick="return confirm('确定上传？');" value="上传" class="button" /></form>
					    </td>
					  </tr>
					  </table> 
				</fieldset> 
				</TD>
		</TR>
		</TABLE>
	 </td>
  </tr>
		<TR>
			<TD colspan="2" height="550px">
			<fieldset style="">
				<legend align="left">商品详细描述</legend>
				<form action="<c:url value="/product/douploadpropicdesc"/>" method="post"  enctype="multipart/form-data">
 							 <input type="hidden" value="${pro.pcode}" name="pcode"/>
					  	  上传商品图片:<input type="file" name='pcfile' style="width:250px" id="pname" value="" /><span class="red">(尺寸：970*550)</span><input type="submit" name="Submit" onclick="return confirm('确定上传？');" value="上传" class="button" />
				&ensp;&ensp;
				<c:if test="${pro.pdesc !=null}">
				<a href="<c:url value="/product/removepropicdesc?pcode=${pro.pcode}"/>" onclick="return confirm('确定删除？');">删除</a>
				</c:if>
				</form>
				<hr>
				<div><c:if test="${pro.pdesc !=null}">
					<img src="<c:url value="${pro.pdesc}"/>" ></c:if>
				</div>
			</fieldset>
		</TR>
		</TABLE>
</div>

</body>
</html>